<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var obj = {
            name: '连浩伟',
            age: 20,
            sex: '男',
            fangfa: function() {
                console.log('方法');
            }
        }
        alert(obj.name)
        obj.fangfa()
    </script>
</head>

<body>

</body>

</html>